<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="../header.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>${systemName }</title>
    <link rel="shortcut icon" href="${contextPath}/resources/favicon.ico"> 
    <link href="${contextPath}/resources/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${contextPath}/resources/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <!-- Data Tables -->
    <link href="${contextPath}/resources/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="${contextPath}/resources/css/animate.min.css" rel="stylesheet">
    <link href="${contextPath}/resources/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="${contextPath}/resources/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="${contextPath}/resources/css/plugins/clockpicker/clockpicker.css" rel="stylesheet">
    <!-- FooTable -->
    <link href="${contextPath}/resources/css/plugins/footable/footable.core.css" rel="stylesheet">
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content">
			<div class="ibox-content">
				<form action="${contextPath }/admin/message/list" method="post">
				<h4>消息列表</h4>
				<div class="ibox-content">
					<div class="col-sm-6" id="data_5">
						<div class="input-daterange input-group" id="datepicker">
							<input type="text" class="input-sm form-control data-start" name="startTime" /> 
							<span class="input-group-addon">到</span>
							<input type="text" class="input-sm form-control" name="endTime" />
						</div>
					</div>
					<div class="col-sm-6">
						<div class="input-group">
							<input type="text" name="keyword" placeholder="Search"	class="input-sm form-control"> 
							<span class="input-group-btn">
								<input type="submit" class="btn btn-sm btn-primary" value="搜索"/>
							</span>
						</div>
					</div>
				</div>
				</form>
			</div>
			<div class="table-responsive">
				<table class="footable table table-stripped toggle-arrow-tiny">
					<thead>
						<tr>
							<th>标题</th>
							<th>是否推送</th>
							<th>推送时间</th>
							<th data-hide="all">内容</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${list}" var="cat" varStatus="catVS">
						<tr>
							<td>${cat.title }</td>
							<td>
							<c:if test="${cat.isPush eq 0}">否</c:if>
							<c:if test="${cat.isPush eq 1}">是</c:if>
							</td>
							<td>
							<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss"  value="${cat.createTime}" />
							</td>
							<td>${cat.content }</td>
						</tr>
						</c:forEach>
					</tbody>
					<tfoot>
                      <tr>
                          <td colspan="5">
                              <ul class="pagination pull-right"></ul>
                          </td>
                      </tr>
                    </tfoot>
				</table>
		</div>
	</div>
	<script src="${contextPath}/resources/js/jquery.min.js?v=2.1.4"></script>
    <script src="${contextPath}/resources/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="${contextPath}/resources/js/plugins/fullcalendar/moment.min.js"></script>
    <script src="${contextPath}/resources/js/plugins/jeditable/jquery.jeditable.js"></script>
    <script src="${contextPath}/resources/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="${contextPath}/resources/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="${contextPath}/resources/js/content.min.js?v=1.0.0"></script>
    <!-- Data picker -->
    <script src="${contextPath}/resources/js/plugins/datapicker/bootstrap-datepicker.js"></script>
    <!-- Date range picker -->
    <script src="${contextPath}/resources/js/plugins/daterangepicker/daterangepicker.js"></script>
    <!-- FooTable -->
    <script src="${contextPath}/resources/js/plugins/footable/footable.all.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    	$('.footable').footable();
    	$('#data_5 .input-daterange').datepicker({
            keyboardNavigation: false,
            forceParse: false,
            autoclose: true,
            format: 'yyyy-mm-dd',
            todayBtn: true,
            clearBtn: true
        });
    });
    </script>
</body>
</html>
